<!DOCTYPE html>
<html lang="en">
  	<head>
	    <meta charset="utf-8">
	    <title>学生管理系统</title>
	    <meta name="viewport" content="width=device-width, initial-scale=1.0">
	    <meta name="description" content="">
	    <meta name="author" content="">

	    <!-- Bootstrap core CSS -->
	    <link href="/admin/bootstrap/css/bootstrap.min.css" rel="stylesheet">
		
		<!-- Font Awesome -->
		<link href="/admin/css/font-awesome.min.css" rel="stylesheet">

		<!-- ionicons -->
		<link href="/admin/css/ionicons.min.css" rel="stylesheet">
		
		<!-- Slider -->
		<link href="/admin/css/bootstrap-slider.css" rel="stylesheet"/>

		<!-- Tag Input -->
		<link href="/admin/css/jquery.tagsinput.css" rel="stylesheet">

		<!-- Date Time Picker -->
		<link href="/admin/css/datetimepicker.css" rel="stylesheet">
		
		<!-- Select2 -->
		<link href="/admin/css/select2/select2.css" rel="stylesheet"/>	
		
		<!-- Simplify -->
		<link href="/admin/css/simplify.min.css" rel="stylesheet">

		<!-- Colorbox -->
		<link href="/admin/css/colorbox/colorbox.css" rel="stylesheet">

		<!-- 函数库 -->
		<script src='/admin/js/common.js'></script>

		<style>
			.btn{
				padding: 2px 12px;
			}
			#cboxClose{
				position: absolute;
				right: 0;
    			bottom: 0;
			}
		</style>
  	</head>

  	<body class="overflow-hidden">
		<div class="wrapper preload">
			<div class="sidebar-right">
				<div class="sidebar-inner scrollable-sidebar">
					<div class="sidebar-header clearfix">
						<input class="form-control dark-input" placeholder="Search" type="text">
						<div class="btn-group pull-right">
							<a href="#" class="sidebar-setting" data-toggle="dropdown"><i class="fa fa-cog fa-lg"></i></a>
							<ul class="dropdown-menu pull-right flipInV">
								<li><a href="#"><i class="fa fa-circle text-danger"></i><span class="m-left-xs">Busy</span></a></li>
								<li><a href="#"><i class="fa fa-circle-o"></i><span class="m-left-xs">Turn Off Chat</span></a></li>
							</ul>
						</div>
					</div>
					<div class="title-block">
						Group Chat
					</div>
					<div class="content-block">
						<ul class="sidebar-list">
							<li>
								<a href="#">
									<i class="fa fa-circle-o text-success"></i><span class="m-left-xs">Close Friends</span>
								</a>
							</li>
							<li>
								<a href="#">
									<i class="fa fa-circle-o text-success"></i><span class="m-left-xs">Business</span>
								</a>
							</li>
						</ul>
					</div>
					<div class="title-block">
						Favorites
					</div>
					<div class="content-block">
						<ul class="sidebar-list">
							<li>
								<a href="#" class="clearfix">
									<img src="/admin/images/profile/profile2.jpg" class="img-circle" alt="user avatar">
									<div class="chat-detail m-left-sm">
										<div class="chat-name">
											John Doe
										</div>
										<div class="chat-message">
											Where are you?
										</div>
									</div>
									<div class="chat-status">
										<i class="fa fa-circle-o text-success"></i>
									</div>
									<div class="chat-alert">
										<span class="badge badge-purple bounceIn animation-delay2">2</span>
									</div>
								</a>
							</li>
							<li>
								<a href="#" class="clearfix">
									<img src="/admin/images/profile/profile3.jpg" class="img-circle" alt="user avatar">
									<div class="chat-detail m-left-sm">
										<div class="chat-name">
											Jane Doe
										</div>
										<div class="chat-message">
											Hello
										</div>
									</div>
									<div class="chat-status">
										<i class="fa fa-circle-o text-success"></i>
									</div>
									<div class="chat-alert">
										<span class="badge badge-info bounceIn animation-delay2">1</span>
									</div>
								</a>
							</li>
							<li>
								<a href="#" class="clearfix">
									<img src="/admin/images/profile/profile4.jpg" class="img-circle" alt="user avatar">
									<div class="chat-detail m-left-sm">
										<div class="chat-name">
											John Doe
										</div>
										<div class="chat-message">
											See you again next week.
										</div>
									</div>
									<div class="chat-status">
										<i class="fa fa-circle-o text-danger"></i>
									</div>
									<div class="chat-alert">
										<i class="fa fa-check text-success"></i>
									</div>
								</a>
							</li>
							<li>
								<a href="#" class="clearfix">
									<img src="/admin/images/profile/profile5.jpg" class="img-circle" alt="user avatar">
									<div class="chat-detail m-left-sm">
										<div class="chat-name">
											John Doe
										</div>
										<div class="chat-message">
											Hello, Are you there?
										</div>
									</div>
									<div class="chat-status">
										<i class="fa fa-circle-o text-danger"></i>
									</div>
									<div class="chat-alert">
										<i class="fa fa-reply"></i>
									</div>
								</a>
							</li>
						</ul>
					</div>
					<div class="title-block">
						More friends
					</div>
					<div class="content-block">
						<ul class="sidebar-list">
							<li>
								<a href="#" class="clearfix">
									<img src="/admin/images/profile/profile6.jpg" class="img-circle" alt="user avatar">
									<div class="chat-detail m-left-sm">
										<div class="chat-name">
											John Doe
										</div>
										<div class="chat-message">
											Where are you?
										</div>
									</div>
									<div class="chat-status">
										<i class="fa fa-circle-o text-success"></i>
									</div>
									<div class="chat-alert">
										<span class="badge badge-success bounceIn animation-delay2">2</span>
									</div>
								</a>
							</li>
							<li>
								<a href="#" class="clearfix">
									<img src="/admin/images/profile/profile7.jpg" class="img-circle" alt="user avatar">
									<div class="chat-detail m-left-sm">
										<div class="chat-name">
											Jane Doe
										</div>
										<div class="chat-message">
											Hello
										</div>
									</div>
									<div class="chat-status">
										<i class="fa fa-circle-o text-success"></i>
									</div>
									<div class="chat-alert">
										<span class="badge badge-danger bounceIn animation-delay2">1</span>
									</div>
								</a>
							</li>
							<li>
								<a href="#" class="clearfix">
									<img src="/admin/images/profile/profile8.jpg" class="img-circle" alt="user avatar">
									<div class="chat-detail m-left-sm">
										<div class="chat-name">
											John Doe
										</div>
										<div class="chat-message">
											See you again next week.
										</div>
									</div>
									<div class="chat-status">
										<i class="fa fa-circle-o text-danger"></i>
									</div>
									<div class="chat-alert">
										<i class="fa fa-check text-success"></i>
									</div>
								</a>
							</li>
							<li>
								<a href="#" class="clearfix">
									<img src="/admin/images/profile/profile9.jpg" class="img-circle" alt="user avatar">
									<div class="chat-detail m-left-sm">
										<div class="chat-name">
											John Doe
										</div>
										<div class="chat-message">
											Hello, Are you there?
										</div>
									</div>
									<div class="chat-status">
										<i class="fa fa-circle-o text-danger"></i>
									</div>
									<div class="chat-alert">
										<i class="fa fa-reply"></i>
									</div>
								</a>
							</li>
						</ul>
					</div>
				</div><!-- sidebar-inner -->
			</div><!-- sidebar-right -->
			
			<!-- 头部的搜索、用户名、退出登录 -->
			<header class="top-nav">
				<div class="top-nav-inner">
					<div class="nav-header">
						<button type="button" class="navbar-toggle pull-left sidebar-toggle" id="sidebarToggleSM">
							<span class="icon-bar"></span>
							<span class="icon-bar"></span>
							<span class="icon-bar"></span>
						</button>
						
						<ul class="nav-notification pull-right">
							<li>
								<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-cog fa-lg"></i></a>
								<span class="badge badge-danger bounceIn">1</span>
								<ul class="dropdown-menu dropdown-sm pull-right">
									<li class="user-avatar">
										<img src="/admin/images/profile/profile1.jpg" alt="" class="img-circle">
										<div class="user-content">
											<h5 class="no-m-bottom">John Doe</h5>
											<div class="m-top-xs">
												<a href="profile.html" class="m-right-sm">Profile</a>
												<a href="signin.html">Log out</a>
											</div>
										</div>
									</li>	  
									<li>
										<a href="inbox.html">
											Inbox
											<span class="badge badge-danger bounceIn animation-delay2 pull-right">1</span>
										</a>
									</li>			  
									<li>
										<a href="#">
											Notification
											<span class="badge badge-purple bounceIn animation-delay3 pull-right">2</span>
										</a>
									</li>			  
									<li>
										<a href="#" class="sidebarRight-toggle">
											Message
											<span class="badge badge-success bounceIn animation-delay4 pull-right">7</span>
										</a>
									</li>			  	  
									<li class="divider"></li>
									<li>
										<a href="#">Setting</a>
									</li>			  	  
								</ul>
							</li>
						</ul>
						
						<a href="index.html" class="brand">
							<i class="fa fa-database"></i><span class="brand-name">学生管理系统</span>
						</a>
					</div>
					<div class="nav-container">
						<button type="button" class="navbar-toggle pull-left sidebar-toggle" id="sidebarToggleLG">
							<span class="icon-bar"></span>
							<span class="icon-bar"></span>
							<span class="icon-bar"></span>
						</button>
						<ul class="nav-notification">	
							<li class="search-list">
								<form action="" id="searchForm">
									<div class="search-input-wrapper">
										<div class="search-input">
											<input type="text" class="form-control input-sm inline-block">
											<a href="javascript:;" class="input-icon text-normal"><i class="ion-ios7-search-strong"></i></a>
											<!-- <input type="submit" style="display: none;" class="hideInput"> -->
										</div>
									</div>
								</form>
							</li>
						</ul>
						<div class="pull-right m-right-sm">
							<div class="user-block hidden-xs">
								<a href="#" id="userToggle" data-toggle="dropdown">
									<img src="/admin/images/profile/profile1.jpg" alt="" class="img-circle inline-block user-profile-pic">
									<div class="user-detail inline-block">
										<span class="adminName"></span>
										<i class="fa fa-angle-down"></i>
									</div>
								</a>
								<div class="panel border dropdown-menu user-panel">
									<div class="panel-body paddingTB-sm">
										<ul>
											<li>
												<a href="profile.html">
													<i class="fa fa-edit fa-lg"></i><span class="m-left-xs">修改密码</span>
												</a>
											</li>
											<li>
												<a href="inbox.html">
													<i class="fa fa-inbox fa-lg"></i><span class="m-left-xs">消息</span>
													<span class="badge badge-danger bounceIn animation-delay3">2</span>
												</a>
											</li>
											<li>
												<a href="/admin/main/logout">
													<i class="fa fa-power-off fa-lg"></i><span class="m-left-xs">退出</span>
												</a>
											</li>
										</ul>
									</div>
								</div>
							</div>
							<ul class="nav-notification">
								<li>
									<a href="#" data-toggle="dropdown"><i class="fa fa-envelope fa-lg"></i></a>
									<span class="badge badge-purple bounceIn animation-delay5 active">2</span>
									<ul class="dropdown-menu message pull-right">
										<li><a>You have 4 new unread messages</a></li>					  
										<li>
											<a class="clearfix" href="#">
												<img src="/admin/images/profile/profile2.jpg" alt="User Avatar">
												<div class="detail">
													<strong>John Doe</strong>
													<p class="no-margin">
														Lorem ipsum dolor sit amet...
													</p>
													<small class="text-muted"><i class="fa fa-check text-success"></i> 27m ago</small>
												</div>
											</a>	
										</li>
										<li>
											<a class="clearfix" href="#">
												<img src="/admin/images/profile/profile3.jpg" alt="User Avatar">
												<div class="detail">
													<strong>Jane Doe</strong>
													<p class="no-margin">
														Lorem ipsum dolor sit amet...
													</p>
													<small class="text-muted"><i class="fa fa-check text-success"></i> 5hr ago</small>
												</div>
											</a>	
										</li>
										<li>
											<a class="clearfix" href="#">
												<img src="/admin/images/profile/profile4.jpg" alt="User Avatar">
												<div class="detail m-left-sm">
													<strong>Bill Doe</strong>
													<p class="no-margin">
														Lorem ipsum dolor sit amet...
													</p>
													<small class="text-muted"><i class="fa fa-reply"></i> Yesterday</small>
												</div>
											</a>	
										</li>
										<li>
											<a class="clearfix" href="#">
												<img src="/admin/images/profile/profile5.jpg" alt="User Avatar">
												<div class="detail">
													<strong>Baby Doe</strong>
													<p class="no-margin">
														Lorem ipsum dolor sit amet...
													</p>
													<small class="text-muted"><i class="fa fa-reply"></i> 9 Feb 2013</small>
												</div>
											</a>	
										</li>
										<li><a href="#">View all messages</a></li>					  
									</ul>
								</li>
								<li>
									<a href="#" data-toggle="dropdown"><i class="fa fa-bell fa-lg"></i></a>
									<span class="badge badge-info bounceIn animation-delay6 active">4</span>
									<ul class="dropdown-menu notification dropdown-3 pull-right">
										<li><a href="#">You have 5 new notifications</a></li>					  
										<li>
											<a href="#">
												<span class="notification-icon bg-warning">
													<i class="fa fa-warning"></i>
												</span>
												<span class="m-left-xs">Server #2 not responding.</span>
												<span class="time text-muted">Just now</span>
											</a>
										</li>
										<li>
											<a href="#">
												<span class="notification-icon bg-success">
													<i class="fa fa-plus"></i>
												</span>
												<span class="m-left-xs">New user registration.</span>
												<span class="time text-muted">2m ago</span>
											</a>
										</li>
										<li>
											<a href="#">
												<span class="notification-icon bg-danger">
													<i class="fa fa-bolt"></i>
												</span>
												<span class="m-left-xs">Application error.</span>
												<span class="time text-muted">5m ago</span>
											</a>
										</li>
										<li>
											<a href="#">
												<span class="notification-icon bg-success">
													<i class="fa fa-usd"></i>
												</span>
												<span class="m-left-xs">2 items sold.</span>
												<span class="time text-muted">1hr ago</span>
											</a>
										</li>
										<li>
											<a href="#">
												<span class="notification-icon bg-success">
													<i class="fa fa-plus"></i>
												</span>
												<span class="m-left-xs">New user registration.</span>
												<span class="time text-muted">1hr ago</span>
											</a>
										</li>
										<li><a href="#">View all notifications</a></li>					  
									</ul>
								</li>
								<li class="chat-notification">
									<a href="#" class="sidebarRight-toggle"><i class="fa fa-comments fa-lg"></i></a>
									<span class="badge badge-danger bounceIn">1</span>

									<!-- <div class="chat-alert">
										Hello, Are you there?
									</div> -->
								</li>
							</ul>
						</div>
					</div>
				</div><!-- ./top-nav-inner -->	
			</header>
	
			<!-- 左边菜单 -->
			<aside class="sidebar-menu fixed">
				<div class="sidebar-inner scrollable-sidebar">
					<div class="main-menu">
						<ul class="accordion">
							<li class="menu-header">
								Main Menu
							</li>
							<li class="bg-palette2 {{#if(page==='mainIndex')}}open{{/if}}">
								<a href="/admin/main/main_index">
									<span class="menu-content block">
										<span class="menu-icon"><i class="block fa fa-home fa-lg"></i></span>
										<span class="text m-left-sm">主页</span>
									</span>
									<span class="menu-content-hover block">
										Home
									</span>
								</a>
							</li>
							<!-- bg-palette1 bg-palette2 bg-palette3 bg-palette4 -->
							<li class="openable bg-palette3 {{#if(page==='clsAdd'||page==='clsList')}}open{{/if}}">
								<a href="#">
									<span class="menu-content block">
										<span class="menu-icon"><i class="block fa fa-list fa-lg"></i></span>
										<span class="text m-left-sm">班级管理</span>
										<span class="submenu-icon"></span>
									</span>
									<span class="menu-content-hover block">
										班级
									</span>
								</a>
								<ul class="submenu bg-palette4">
									<li class="{{#if(page==='clsAdd')}}active{{/if}}"><a href="/admin/class/class_add"><span class="submenu-label">添加班级</span></a></li>
									<li class="{{#if(page==='clsList')}}active{{/if}}"><a href="/admin/class/class_list"><span class="submenu-label">班级列表</span></a></li>
								</ul>
							</li>
							<li class="openable bg-palette4 {{#if(page==='stuAdd'||page==='stuList')}}open{{/if}}">
								<a href="#">
									<span class="menu-content block">
										<span class="menu-icon"><i class="block fa fa-list fa-lg"></i></span>
										<span class="text m-left-sm">学生管理</span>
										<span class="submenu-icon"></span>
									</span>
									<span class="menu-content-hover block">
										学生
									</span>
								</a>
								<ul class="submenu bg-palette4">
									<li class="{{#if(page==='stuAdd')}}active{{/if}}"><a href="/admin/student/student_add"><span class="submenu-label">添加学生</span></a></li>
									<li class="{{#if(page==='stuList')}}active{{/if}}"><a href="/admin/student/student_list"><span class="submenu-label">学生列表</span></a></li>
								</ul>
							</li>
							<li class="openable bg-palette1 {{#if(page==='subAdd'||page==='subList')}}open{{/if}}">
								<a href="#">
									<span class="menu-content block">
										<span class="menu-icon"><i class="block fa fa-list fa-lg"></i></span>
										<span class="text m-left-sm">课程管理</span>
										<span class="submenu-icon"></span>
									</span>
									<span class="menu-content-hover block">
										课程
									</span>
								</a>
								<ul class="submenu bg-palette4">
									<li class="{{#if(page==='subAdd')}}active{{/if}}"><a href="/admin/subject/subject_add"><span class="submenu-label">添加课程</span></a></li>
									<li class="{{#if(page==='subList')}}active{{/if}}"><a href="/admin/subject/subject_list"><span class="submenu-label">课程列表</span></a></li>
								</ul>
							</li>
						</ul>
					</div>	
					<div class="sidebar-fix-bottom clearfix">
						<div class="user-dropdown dropup pull-left">
							<a href="#" class="dropdwon-toggle font-18" data-toggle="dropdown"><i class="ion-person-add"></i>
							</a>
							<ul class="dropdown-menu">
								<li>
									<a href="inbox.html">
										Inbox
										<span class="badge badge-danger bounceIn animation-delay2 pull-right">1</span>
									</a>
								</li>			  
								<li>
									<a href="#">
										Notification
										<span class="badge badge-purple bounceIn animation-delay3 pull-right">2</span>
									</a>
								</li>			  
								<li>
									<a href="#" class="sidebarRight-toggle">
										Message
										<span class="badge badge-success bounceIn animation-delay4 pull-right">7</span>
									</a>
								</li>			  	  
								<li class="divider"></li>
								<li>
									<a href="#">Setting</a>
								</li>			  	  
							</ul>
						</div>
						<a href="lockscreen.html" class="pull-right font-18"><i class="ion-log-out"></i></a>
					</div>
				</div><!-- sidebar-inner -->
			</aside>

			<!-- 中部内容（需要加载） -->
			{{block('main')}}
			
			<!-- 底部 -->
			<footer class="footer">
				<span class="footer-brand">
					<strong class="text-danger">前端大神</strong> Admin
				</span>
				<p class="no-margin">
					&copy; 2020 <strong>前端大神 Admin</strong>. ALL Rights Reserved. 
				</p>	
			</footer>
		</div><!-- /wrapper -->

		<!-- Small modal -->
		<div class="modal fade" id="formInModal">
		  	<div class="modal-dialog modal-sm">
		    	<div class="modal-content">
		      		<div class="modal-header">
		        		<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
		        		<h4 class="modal-title" id="myModalLabel">Login</h4>
		      		</div>
		      		<div class="modal-body">
		        		<form role="form">
				  			<div class="form-group">
				    			<label for="inputEmailModal">Email address</label>
				    			<input type="email" class="form-control" id="inputEmailModal" placeholder="Enter email">
				  			</div>
				  			<div class="form-group">
							    <label for="inputPasswordModal">Password</label>
							    <input type="password" class="form-control" id="inputPasswordModal" placeholder="Password">
	  			  			</div>
	  			  			<div class="form-group">
			   	    			<div class="custom-checkbox">
									<input type="checkbox" id="checkboxModal">
							  	  	<label for="checkboxModal"></label>
				    			</div>
				    			Remember Me
				  			</div>
		        		</form>

				        <a class="btn btn-primary block m-top-md"><i class="fa fa-facebook"></i> Login with facebook</a>
				        <a class="btn btn-danger block m-top-md">Login</a>
		      		</div>
		    	</div>
		  	</div>
		</div>

		<!-- Delete Widget Confirmation -->
		<div class="custom-popup delete-widget-popup delete-confirmation-popup" id="deleteWidgetConfirm">
			<div class="popup-header text-center">
				<span class="fa-stack fa-4x">
				  <i class="fa fa-circle fa-stack-2x"></i>
				  <i class="fa fa-lock fa-stack-1x fa-inverse"></i>
				</span>
			</div>
			<div class="popup-body text-center">
				<h5>您确定删除吗?</h5>
				<strong class="block m-top-xs"><i class="fa fa-exclamation-circle m-right-xs text-danger"></i>删除后不可恢复哦，请谨慎操作</strong>
			
				<div class="text-center m-top-lg">
					<a class="btn btn-success m-right-sm remove-widget-btn" id="0" ctrname="">立即删除</a>
					<a class="btn btn-default deleteWidgetConfirm_close">考虑一下</a>
				</div>
			</div>
		</div>

		<a href="#" class="scroll-to-top hidden-print"><i class="fa fa-chevron-up fa-lg"></i></a>

		<!-- 自己 -->
		
		<div class="custom-popup delete-widget-popup delete-confirmation-popup" id="statusConfirm">
			<div class="popup-body text-center">
				<form action="" id="statusForm">
				<div class="form-group">
					<label class="control-label">请选择学生状态</label>
					<div class="col-lg-12">
						<div class="radio inline-block">
							<div class="custom-radio m-right-xs">
								<input type="radio" id="inlineRadio0" name="stu_status" value="0" status_attr="">
								<label for="inlineRadio0"></label>
							</div>
							<div class="inline-block vertical-top">无</div>
						</div>
						<div class="radio inline-block">
							<div class="custom-radio m-right-xs">
								<input type="radio" id="inlineRadio1" name="stu_status" value="1" status_attr="">
								<label for="inlineRadio1"></label>
							</div>
							<div class="inline-block vertical-top">在读</div>
						</div>
						<div class="radio inline-block">
							<div class="custom-radio m-right-xs">
								<input type="radio" id="inlineRadio2" name="stu_status" value="2" status_attr="">
								<label for="inlineRadio2"></label>
							</div>
							<div class="inline-block vertical-top">休学</div>
						</div>
						<div class="radio inline-block">
							<div class="custom-radio m-right-xs">
								<input type="radio" id="inlineRadio3" name="stu_status" value="3" status_attr="">
								<label for="inlineRadio3"></label>
							</div>
							<div class="inline-block vertical-top">开除</div>
						</div>
						<div class="radio inline-block">
							<div class="custom-radio m-right-xs">
								<input type="radio" id="inlineRadio4" name="stu_status" value="4" status_attr="">
								<label for="inlineRadio4"></label>
							</div>
							<div class="inline-block vertical-top">已毕业</div>
						</div>
					</div><!-- /.col -->
				</div><!-- /form-group -->
				</form>
				<div class="text-center m-top-lg">
					<a class="btn btn-success m-right-sm" id="statusSure">确定</a>
					<a class="btn btn-default statusCancel">取消</a>
				</div>
			</div>
		</div>
		
	    <!-- Le javascript
	    ================================================== -->
	    <!-- Placed at the end of the document so the pages load faster -->
		
		<!-- Jquery -->
		<script src="/admin/js/jquery-1.11.1.min.js"></script>
		
		<!-- Bootstrap -->
	    <script src="/admin/bootstrap/js/bootstrap.min.js"></script>
	  
		<!-- Popup Overlay -->
		<script src='/admin/js/jquery.popupoverlay.min.js'></script>

		<!-- Slider -->
		<script src='/admin/js/uncompressed/bootstrap-slider.js'></script>	
		
		<!-- Tag Input -->
		<script src='/admin/js/jquery.tagsinput.min.js'></script>

		<!-- Moment -->
		<script src='/admin/js/uncompressed/moment.js'></script>

		<!-- Date Time picker -->
		<script src='/admin/js/uncompressed/bootstrap-datetimepicker.js'></script>

		<!-- Select2 -->
		<script src='/admin/js/select2.min.js'></script>

		<!-- Slimscroll -->
		<script src='/admin/js/jquery.slimscroll.min.js'></script>

		<!-- Modernizr -->
		<script src='/admin/js/modernizr.min.js'></script>
		
		<!-- Simplify 弹窗插件 -->
		<script src="/admin/js/simplify/simplify.js"></script>

		<!-- Colorbox -->
		<script src='/admin/js/jquery.colorbox.min.js'></script>

		<script>
			$(function()	{
				//Delete Widget Confirmation
				$('#deleteWidgetConfirm').popup({
					vertical: 'top',
					pagecontainer: '.container',
					transition: 'all 0.3s'
				});
				// 自己
				$('#statusConfirm').popup({
					vertical: 'top',
					pagecontainer: '.container',
					transition: 'all 0.3s'
				});

				// Slider		
				$('#horizontalSlider1').slider();
				$('#horizontalSlider2').slider();
				$('#horizontalSlider3').slider();
				$('#horizontalSlider4').slider();
				
				$('#verticalSlider1').slider();
				$('#verticalSlider2').slider();
				$('#verticalSlider3').slider();
				$('#verticalSlider4').slider();
				$('#verticalSlider5').slider();

				//Select2
				$('.select2').select2();

				//Tag Input
				$('#tagsExample').tagsInput();

				//Date & Time Picker
				// $('.datepicker-input').datetimepicker({
				// 	pickTime: false
				// });

				//Date & Time Picker
				// $('.timepicker-input').datetimepicker({
				// 	pickDate: false
				// });

				//Date & Time Picker
				$('.datetimepicker-input').datetimepicker({
					// pickTime: false		// 不显示时间，只有日期
					// format:'yyyy-mm-dd',
					// todayBtn:true
					// startView: "year", //初始化视图是‘年’
		            // minView: "month",//最精确视图为'月'
		            // maxView: "decade"//最高视图为'十年'
				});

				// $('#dataTable').dataTable();
				
				$('.stu_time').each(function(){

					// console.log(this.dataset.time);	//js
					// console.log( $(this).data('time') ); //jq
						
					var date = timestampToTime(this.dataset.time);
					$(this).html(date);
				});

				function timestampToTime(timestamp) {
		            var date = new Date(timestamp * 1000);//时间戳为10位需*1000，时间戳为13位的话不需乘1000
		            Y = date.getFullYear() + '-';
		            M = (date.getMonth()+1 < 10 ? '0'+(date.getMonth()+1) : date.getMonth()+1) + '-';
		            D = date.getDate() + ' ';
		            h = date.getHours() + ':';
		            m = date.getMinutes();
		            // return Y+M+D+h+m;
		            return Y+M+D;
		        }


		        $(".enlarged-photo").colorbox({
					rel:'gallery-group1',
					maxWidth: '85%'
				});

				$('.gallery-item').bind('touchstart', function(e){
					$(this).siblings().removeClass('active');
				    $(this).addClass('active');
				});

				$.ajax({
					url:'/admin/main/adminInfo',
					type:'post',
					data:'',
					success:function(res){
						$('.adminName').html(res)
					}
				})

				$('.stu_status').click(function(){
					$('#statusConfirm').popup('show');
					$('#statusConfirm input').attr('status_attr',$(this).attr('status_attr'))
					$('#statusConfirm input').attr('stu_id',$(this).attr('stu_id'))
					$('#statusConfirm input').each(function(i,item){
						if($(this).val()==$(this).attr('status_attr')){
							$(this).prop('checked',true)
						}
					})

					// return false;
				})

				$('#statusSure').on('click',function(){
					
					var formData=new FormData($('#statusForm')[0])
					formData.append('stu_id',$('#statusConfirm input').attr('stu_id'))
					$.ajax({
						url:'/admin/student/student_status',
						type:'post',
						data:formData,
						contentType: false,
		        		processData: false,
		        		dataType: 'json',
		        		success:function(res){
		        			// alert(res.msg)
		        			if(res.error==0){
		        				$('#statusConfirm').popup('hide');
		        				location.href='/admin/student/student_list'
		        			}
		        		}
					})
				})







				$('.statusCancel').click(function(){
					$('#statusConfirm').popup('hide');
					// return false;
				})



			});
			
		</script>

		<script>
			$(function()	{
				var arr=[]
				$('.inbox-check').click(function()	{
					var activeRow = $(this).parent().parent().parent();
					activeRow.toggleClass('active');
					if($(this).prop('checked')){
						$('.piLiang').show()
						arr.push(activeRow.find('.danGe').attr('id'))
					}else{
						$('.piLiang').hide()
						var index=arr.indexOf(activeRow.find('.danGe').attr('id'))
						if (index > -1) { 
							arr.splice(index, 1); 
						}
					}
					var str=arr.join(',')
					$('.piLiang').attr('id',str)
				});

				
				$('#inboxCollapse').click(function()	{
					$('.inbox-menu-inner').slideToggle();
				});

				$('#chkAll').click(function()	{
					arr=[]
					if($(this).prop('checked'))	{
						$('.inbox-check').prop('checked',true);
						$('.inbox-check').parent().parent().parent().addClass('active');
						$('.inbox-check.single').each(function(){
							var activeRow = $(this).parent().parent().parent();
							arr.push(activeRow.find('.danGe').attr('id'))
						})
					}
					else	{
						$('.inbox-check').prop('checked',false);
						$('.inbox-check').parent().parent().parent().removeClass('active');
						$('.inbox-check.single').each(function(){
							var activeRow = $(this).parent().parent().parent();
							arr.pop(activeRow.find('.danGe').attr('id'))
						})
					}
					var str=arr.join(',')
					$('.piLiang').attr('id',str)
				});

				$(window).resize(function() {
					if (Modernizr.mq('(min-width: 980px)')) {
						$('.inbox-menu ul').show();
					}
				});

				// 学生列表的，搜索操作
				$('#stuSearch').on('click',function(){
					// 获取关键字
					var search = $('input[name="search"]').val();
					if(checkRequired(search)){
						alert('请输入关键字');
						return;
					}

					// 跳转
					location.href = '/admin/student/student_list?s='+search;
				});
				// 班级列表的，搜索操作
				$('#clsSearch').on('click',function(){
					// 获取关键字
					var search = $('input[name="search2"]').val();
					if(checkRequired(search)){
						alert('请输入关键字');
						return;
					}

					// 跳转
					location.href = '/admin/class/class_list?s='+search;
				});
				// 课程列表的，搜索操作
				$('#subSearch').on('click',function(){
					// 获取关键字
					var search = $('input[name="search3"]').val();
					if(checkRequired(search)){
						alert('请输入关键字');
						return;
					}

					// 跳转
					location.href = '/admin/subject/subject_list?s='+search;
				});

				
				// $('.search-input a').on('click',function(){
				// 	$('.hideInput').click()
				// })






			});
		</script>
	
  	</body>
</html>